package br.edu.univas.si.tcc.controller;

import java.sql.Connection;
import java.sql.SQLException;

import br.edu.univas.si.tcc.model.DAOException;

public class TesteConexao {
	
	public TesteConexao() {
		testeFireBird();
	}
	
	private void testeFireBird(){
		
		Boolean flag=false;
		Connection conn = null;
		
		try {
			conn = ConnectionBD.getConnection();
			try {
				conn.close();
				flag=true;
			} catch (SQLException e) {
				System.exit(0);
			}
		} catch (DAOException e) {
		
		}
		
		if(flag==true){
			new ControllerPrincipal().iniciarJanela();
		}
	}
}